// Author	: damphat@gmail.com
// Created	: 01/12/2008

#pragma once
#include "vn/CollectionsCommon.h"
#include <vector>


COLLECTION_BEGIN

template<class T>
class Vector {
public:
	void Add(T v) {
		data.push_back(v);
	}

	void Clear() {
		data.clear();
	}

	int  GetCount() const {
		return data.size();
	}

	T& operator[] (int index) {
		CHECK_ARG_RANGE(index, 0, GetCount() - 1);
		return data[index];
	}

	const T& operator[] (int index) const {
		CHECK_ARG_RANGE(index, 0, GetCount() - 1);
		return data[index];
	}

private:
	std::vector<T> data;
};

COLLECTION_END

